<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Device extends Model
{

    protected $table = "devices";

    public $timestamps = true;

    protected $fillable = [
        'store_id',
        'config_id',
        'store_name',
        'merchant_id',
        'merchant_name',
        'device_type',
        'device_name',
        'device_no',
        'device_key',
        'cj',
        'status',
        'type',
        'device_type',
        'ascription',
        "updated_at",
        "created_at",
        "smid", //间连商户号
        "provider_id"
    ];


    public function store()
    {
        return $this->hasOne(Store::class,"store_id","store_id")->select([
            'store_id',
            'store_name',
        ]);
    }

}
